<?php

/**
 * @author NgAnh
 * @copyright 2013
 */

class Answermodel extends CI_Model {
    var $infor_id;
    var $question_id;
    var $template_id;
    var $content;
    var $is_deleted;
    var $ccreated_by_user_id;
    var $created_on_date;
    var $last_modified_by_user_id;
    var $last_modified_on_date;
    
    function __construct()
    {
        // Call the Model constructor
        $this->load->database();
    }
    function get_answer_validation($infor_id){
        $query=$this->db->query("select answer.content from sur_answer as answer, sur_question as question
                                    where  answer.infor_id='".$infor_id."' and question.is_validated='True'");
        return $query;
    }
    /**
 * function check_ex($id){
 *         $query = $this->db->get_where('sur_answer', array('question_id' => $id));
 *         //$ques_id = $query->result_array('$question_id');
 *         $arrlenght = $query->num_rows();
 *         if($arrlenght == 0){
 *             return "false";// no answer
 *         }
 *         else{
 *             return "true";// have answer
 *         }
 *     }
 */
}

?>